import {
	request,
	requestData
} from "../Promise.js"

export default {
	// 例行检查计划
	getRoutineList(data) {
		return request({
			url: '/data-inspection-study/hg-app/plan-routine/page',
			method: 'post',
			data
		})
	},

	// 例行检查任务
	getCheckTaskList(data) {
		return request({
			url: '/data-inspection-study/hg-app/task/page',
			method: 'post',
			data
		})
	},

	// 例行检查任务详情
	getCheckTaskDetails(data) {
		return request({
			url: '/data-inspection-study/hg-app/task/view-insp-record',
			method: 'post',
			data: data,
			header: {
				'content-type': "application/x-www-form-urlencoded",
			}
		})
	},

	// 例行检查任务检查记录维护详情
	getCheckTaskMaintain(data) {
		return request({
			url: '/data-inspection-study/hg-app/task/view-insp-result',
			method: 'post',
			data: data,
			header: {
				'content-type': "application/x-www-form-urlencoded",
			}
		})
	},


	// 安全生产保存
	safeKeepSave(taskId, params) {
		return request({
			url: `/data-inspection-study/hg-app/task/sp-save-record/${taskId}`,
			method: 'post',
			data: params,
		})
	},

	// 从业人员保存
	practitionerSave(taskId, params) {
		return request({
			url: `/data-inspection-study/hg-app/task/sp-save-record/${taskId}`,
			method: 'post',
			data: params,
		})
	},

	// 运输车辆保存
	transportVehicleSave(taskId, params) {
		return request({
			url: `/data-inspection-study/hg-app/task/sp-save-record/${taskId}`,
			method: 'post',
			data: params,
		})
	},

	// 检查记录保存
	inspectionSave(params) {
		return request({
			url: '/data-inspection-study/hg-app/task/save-result',
			method: 'post',
			data: params,
		})
	},

}
